<div class="panel panel-default panel-intro">
    <div class="panel-body">
        <div class="row">
            <div class="col-xs-12">
                <div class="print-content" style="text-align: center; padding: 50px; font-size: 24px; font-weight: bold; font-family: 'Courier New', monospace;">
                    <!-- <div style="margin-bottom: 30px;">
                        <h3>生产计划编号</h3>
                    </div>
                    <div style="border: 2px solid #333; padding: 20px; display: inline-block; min-width: 400px;">
                        <span style="letter-spacing: 2px;">{$printContent}</span>
                    </div> -->
                    
                    <!-- 条形码显示区域 -->
                    <div style="margin-top: 30px;">
                        <svg id="barcode"></svg>
                    </div>
                    
                </div>
            </div>
        </div>
        <div class="row" style="margin-top: 30px;" id="printButton">
            <div class="col-xs-12 text-center">
                <button type="button" class="btn btn-success" onclick="window.print()">
                    <i class="fa fa-print"></i> 打印
                </button>
                <button type="button" class="btn btn-default" onclick="Fast.api.close()">
                    <i class="fa fa-close"></i> 关闭
                </button>
            </div>
        </div>
    </div>
</div>

<!-- 引入本地jQuery文件 -->
<script src="__CDN__/assets/libs/jquery/dist/jquery.min.js"></script>
<!-- 引入本地JsBarcode条形码库 -->
<script src="__CDN__/assets/libs/jsbarcode/JsBarcode.all.min.js"></script>
<script>
$(document).ready(function() {
    // 生成条形码
    JsBarcode("#barcode", "{$printContent}", {
        format: "CODE128",
        width: 2,
        height: 100,
        displayValue: true,
        fontSize: 14,
        textMargin: 8,
        margin: 10
    });
    
    // 生成测试条形码
    JsBarcode("#test-barcode", "TEST123456789", {
        format: "CODE128",
        width: 2,
        height: 100,
        displayValue: true,
        fontSize: 14,
        textMargin: 8,
        margin: 10
    });
});
</script>

<style>
@media print {
    /* .panel-heading, .row:last-child {
        display: none;
    } */
    #printButton {
        display: none;
    }
    .panel-body {
        padding: 0;
    }
    .print-content {
        padding: 20px !important;
    }
    #barcode {
        transform: scale(1.2);
        margin: 20px 0;
    }
}
</style>